<template>
<onekit-page>
<onekit-view onekit-class="container">
	<div is="onekit-template-head" :DATA="`${JSON.stringify({title:'open/get/Setting'})}`"></div>
	<onekit-view onekit-class="page-body">
		<onekit-form>
			<onekit-view onekit-class="page-section">
				<onekit-view onekit-class="weui-cells weui-cells_after-title">
					<onekit-view onekit-class="weui-cell weui-cell_input">
						<onekit-view onekit-class="weui-cell__hd">
							<onekit-view onekit-class="weui-label">用户信息</onekit-view>
						</onekit-view>
						<onekit-view onekit-class="weui-cell__bd">
							<onekit-icon v-if="setting['scope.userInfo']" onekit-class="icon-small" type="success_no_circle" size="23"></onekit-icon>
						</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell weui-cell_input">
						<onekit-view onekit-class="weui-cell__hd">
							<onekit-view onekit-class="weui-label">地理位置</onekit-view>
						</onekit-view>
						<onekit-view onekit-class="weui-cell__bd">
							<onekit-icon v-if="setting['scope.userLocation']" onekit-class="icon-small" type="success_no_circle" size="23"></onekit-icon>
						</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell weui-cell_input region">
						<onekit-view onekit-class="weui-cell__hd">
							<onekit-view onekit-class="weui-label">通讯地址</onekit-view>
						</onekit-view>
						<onekit-view onekit-class="weui-cell__bd">
							<onekit-icon v-if="setting['scope.address']" onekit-class="icon-small" type="success_no_circle" size="23"></onekit-icon>
						</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell weui-cell_input detail">
						<onekit-view onekit-class="weui-cell__hd">
							<onekit-view onekit-class="weui-label">发票抬头</onekit-view>
						</onekit-view>
						<onekit-view onekit-class="weui-cell__bd">
							<onekit-icon v-if="setting['scope.invoiceTitle']" onekit-class="icon-small" type="success_no_circle" size="23"></onekit-icon>
						</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell weui-cell_input">
						<onekit-view onekit-class="weui-cell__hd">
							<onekit-view onekit-class="weui-label">微信运动步数</onekit-view>
						</onekit-view>
						<onekit-view onekit-class="weui-cell__bd">
							<onekit-icon v-if="setting['scope.werun']" onekit-class="icon-small" type="success_no_circle" size="23"></onekit-icon>
						</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell weui-cell_input">
						<onekit-view onekit-class="weui-cell__hd">
							<onekit-view onekit-class="weui-label">录音功能</onekit-view>
						</onekit-view>
						<onekit-view onekit-class="weui-cell__bd">
							<onekit-icon v-if="setting['scope.record']" onekit-class="icon-small" type="success_no_circle" size="23"></onekit-icon>
						</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell weui-cell_input">
						<onekit-view onekit-class="weui-cell__hd">
							<onekit-view onekit-class="weui-label">保存到相册</onekit-view>
						</onekit-view>
						<onekit-view onekit-class="weui-cell__bd">
							<onekit-icon v-if="setting['scope.writePhotosAlbum']" onekit-class="icon-small" type="success_no_circle" size="23"></onekit-icon>
						</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell weui-cell_input">
						<onekit-view onekit-class="weui-cell__hd">
							<onekit-view onekit-class="weui-label">摄像头</onekit-view>
						</onekit-view>
						<onekit-view onekit-class="weui-cell__bd">
							<onekit-icon v-if="setting['scope.camera']" onekit-class="icon-small" type="success_no_circle" size="23"></onekit-icon>
						</onekit-view>
					</onekit-view>
				</onekit-view>
			</onekit-view>
		</onekit-form>
		<onekit-view onekit-class="btn-area">
			<onekit-button type="primary" @Tap="getSetting">获取小程序设置</onekit-button>
			<onekit-button open-type="openSetting" type="default">打开小程序设置</onekit-button>
		</onekit-view>
	</onekit-view>
	<div is="onekit-template-foot"></div>
</onekit-view>
</onekit-page></template>
<script>
/* eslint-disable */
import Vue from 'vue';
import onekit_template_0 from '../../../common/head.head.vue';Vue.component('onekit-template-head',onekit_template_0);
import onekit_template_1 from '../../../common/foot.foot.vue';Vue.component('onekit-template-foot',onekit_template_1);
const ONEKIT_JSON= {
  "navigationBarTitleText": "设置",
  "usingComponents": {
    
  }
};
const ONEKIT_SJS = {
};
import wx from '../../../../weixin2vue/wx.js';
import Macro from '../../../../weixin2vue/Macro.js';
const {getApp,getCurrentPages} = Macro;
import Page from '../../../../weixin2vue/OnekitPage.js';
import Component from '../../../../weixin2vue/OnekitComponent.js';
export default Page(ONEKIT_JSON,["setting"],ONEKIT_SJS,{
    "onShareAppMessage"(){
      return {
        "title":'设置',
        "path":'packageAPI/pages/setting/setting'
};
    },
    "data":{
        "setting":{
}
},
    "getSetting"(){
      wx.getSetting({
        "success":(res)=>{
          console.log(res);
          this.setData({
              "setting":res.authSetting
});
        }
});
    }
});

</script>
<style 
 lang="css">
@import '/common/lib/weui.css';
.onekit-form {
  margin-top: 15px ;
}
.weui-cell__bd {
  display: flex ;
  justify-content: center ;
  padding: 10px 0 ;
  min-height: 30px ;
}
</style>